Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 5 - Menu Manager Reference / Menu Manager Functions
Manipulating and Accessing Menu Item Characteristics /


GetMenuItemCommandID

NEW WITH THE APPEARANCE MANAGER

Gets a menu item's command ID.

pascal OSErr GetMenuItemCommandID (
                     MenuHandle inMenu,
                     SInt16 inItem,
                     UInt32* outCommandID);
inMenu
The handle to the menu structure of the menu item for which you wish to get a command ID.
inItem
An integer representing the item number of the menu item for which you wish to get a command ID.
outCommandID
On output, a pointer to an integer representing the value of the item's command ID.
function result
A result code; see "Result Codes".
DISCUSSION
After a successful call to MenuSelect, MenuEvent, or MenuKey, call the GetMenuItemCommandID function to get a menu item's command ID. You can use a menu item's command ID as a position-independent method of signalling a specific action in an application.

SEE ALSO
"Appearance Manager Gestalt Selector Constants".

SetMenuItemCommandID.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998